﻿#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QString>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    QString content1=this->ui->lineEdit->text();
    QString content2=this->ui->lineEdit_2->text();
    int int1=content1.toInt();
    int int2=content2.toInt();
    int result=int1+int2;
    QString output=QString::number(result);
    this->ui->label->setText("="+output);
}
